home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / HyperCard / PrefWorks⁄FileWorks XFCN 1.0 / PrefWorks_FileWorks XFCN 1.0 / cards.xml < prev    next >
Text File  |  1994-03-28  |  29KB  |  803 lines

  1. card_4403.xml
  2. <?xml version="1.0" encoding="utf-8" ?>
  3. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  4. <card>
  5.     <id>4403</id>
  6.     <filler1>0</filler1>
  7.     <bitmap>BMAP_4818.pbm</bitmap>
  8.     <cantDelete> <true /> </cantDelete>
  9.     <showPict> <true /> </showPict>
  10.     <dontSearch> <false /> </dontSearch>
  11.     <owner>2582</owner>
  12.     <link rel="stylesheet" type="text/css" href="stylesheet_3145.css" />
  13.     <part>
  14.         <id>1</id>
  15.         <type>button</type>
  16.         <visible> <true /> </visible>
  17.         <reserved5> 0 </reserved5>
  18.         <reserved4> 0 </reserved4>
  19.         <reserved3> 0 </reserved3>
  20.         <reserved2> 0 </reserved2>
  21.         <reserved1> 0 </reserved1>
  22.         <enabled> <true /> </enabled>
  23.         <rect>
  24.             <left>26</left>
  25.             <top>36</top>
  26.             <right>131</right>
  27.             <bottom>61</bottom>
  28.         </rect>
  29.         <style>roundrect</style>
  30.         <showName> <true /> </showName>
  31.         <highlight> <false /> </highlight>
  32.         <autoHighlight> <true /> </autoHighlight>
  33.         <sharedHighlight> <true /> </sharedHighlight>
  34.         <family>0</family>
  35.         <titleWidth>0</titleWidth>
  36.         <icon>0</icon>
  37.         <textAlign>center</textAlign>
  38.         <font>Chicago</font>
  39.         <textSize>12</textSize>
  40.         <textStyle>plain</textStyle>
  41.         <name>Open File</name>
  42.         <script>on mouseUpglobal refnumshow message boxput FileWorks(Open,cd field pathname,cd field newfile,char 1 to 4 of cd field type,¬¨char 1 to 4 of cd field creator) into fredif first word of fred is not "ERROR:" thenput the first item of fred into refnumput the second item of fred into cd field pathnameend ifput fredend mouseUp</script>
  43.     </part>
  44.     <part>
  45.         <id>3</id>
  46.         <type>field</type>
  47.         <visible> <true /> </visible>
  48.         <dontWrap> <false /> </dontWrap>
  49.         <dontSearch> <false /> </dontSearch>
  50.         <sharedText> <false /> </sharedText>
  51.         <fixedLineHeight> <false /> </fixedLineHeight>
  52.         <autoTab> <false /> </autoTab>
  53.         <lockText> <false /> </lockText>
  54.         <rect>
  55.             <left>85</left>
  56.             <top>81</top>
  57.             <right>132</right>
  58.             <bottom>99</bottom>
  59.         </rect>
  60.         <style>rectangle</style>
  61.         <autoSelect> <false /> </autoSelect>
  62.         <showLines> <false /> </showLines>
  63.         <wideMargins> <false /> </wideMargins>
  64.         <multipleLines> <false /> </multipleLines>
  65.         <reservedFamily> 0 </reservedFamily>
  66.         <titleWidth>0</titleWidth>
  67.         <icon>0</icon>
  68.         <textAlign>left</textAlign>
  69.         <font>Geneva</font>
  70.         <textSize>12</textSize>
  71.         <textStyle>plain</textStyle>
  72.         <textHeight>16</textHeight>
  73.         <name>Type</name>
  74.         <script></script>
  75.     </part>
  76.     <part>
  77.         <id>4</id>
  78.         <type>field</type>
  79.         <visible> <true /> </visible>
  80.         <dontWrap> <false /> </dontWrap>
  81.         <dontSearch> <false /> </dontSearch>
  82.         <sharedText> <false /> </sharedText>
  83.         <fixedLineHeight> <false /> </fixedLineHeight>
  84.         <autoTab> <false /> </autoTab>
  85.         <lockText> <false /> </lockText>
  86.         <rect>
  87.             <left>85</left>
  88.             <top>111</top>
  89.             <right>133</right>
  90.             <bottom>129</bottom>
  91.         </rect>
  92.         <style>rectangle</style>
  93.         <autoSelect> <false /> </autoSelect>
  94.         <showLines> <false /> </showLines>
  95.         <wideMargins> <false /> </wideMargins>
  96.         <multipleLines> <false /> </multipleLines>
  97.         <reservedFamily> 0 </reservedFamily>
  98.         <titleWidth>0</titleWidth>
  99.         <icon>0</icon>
  100.         <textAlign>left</textAlign>
  101.         <font>Geneva</font>
  102.         <textSize>12</textSize>
  103.         <textStyle>plain</textStyle>
  104.         <textHeight>16</textHeight>
  105.         <name>Creator</name>
  106.         <script></script>
  107.     </part>
  108.     <part>
  109.         <id>5</id>
  110.         <type>button</type>
  111.         <visible> <true /> </visible>
  112.         <reserved5> 0 </reserved5>
  113.         <reserved4> 0 </reserved4>
  114.         <reserved3> 0 </reserved3>
  115.         <reserved2> 0 </reserved2>
  116.         <reserved1> 0 </reserved1>
  117.         <enabled> <true /> </enabled>
  118.         <rect>
  119.             <left>150</left>
  120.             <top>36</top>
  121.             <right>255</right>
  122.             <bottom>62</bottom>
  123.         </rect>
  124.         <style>roundrect</style>
  125.         <showName> <true /> </showName>
  126.         <highlight> <false /> </highlight>
  127.         <autoHighlight> <true /> </autoHighlight>
  128.         <sharedHighlight> <true /> </sharedHighlight>
  129.         <family>0</family>
  130.         <titleWidth>0</titleWidth>
  131.         <icon>0</icon>
  132.         <textAlign>center</textAlign>
  133.         <font>Chicago</font>
  134.         <textSize>12</textSize>
  135.         <textStyle>plain</textStyle>
  136.         <name>Close File</name>
  137.         <script>on mouseUpglobal refnumput FileWorks(Close,refnum)put empty into refnumend mouseUp</script>
  138.     </part>
  139.     <part>
  140.         <id>7</id>
  141.         <type>field</type>
  142.         <visible> <true /> </visible>
  143.         <dontWrap> <false /> </dontWrap>
  144.         <dontSearch> <false /> </dontSearch>
  145.         <sharedText> <false /> </sharedText>
  146.         <fixedLineHeight> <false /> </fixedLineHeight>
  147.         <autoTab> <false /> </autoTab>
  148.         <lockText> <false /> </lockText>
  149.         <rect>
  150.             <left>97</left>
  151.             <top>187</top>
  152.             <right>147</right>
  153.             <bottom>205</bottom>
  154.         </rect>
  155.         <style>rectangle</style>
  156.         <autoSelect> <false /> </autoSelect>
  157.         <showLines> <false /> </showLines>
  158.         <wideMargins> <false /> </wideMargins>
  159.         <multipleLines> <false /> </multipleLines>
  160.         <reservedFamily> 0 </reservedFamily>
  161.         <titleWidth>0</titleWidth>
  162.         <icon>0</icon>
  163.         <textAlign>left</textAlign>
  164.         <font>Geneva</font>
  165.         <textSize>12</textSize>
  166.         <textStyle>plain</textStyle>
  167.         <textHeight>16</textHeight>
  168.         <name>Newfile</name>
  169.         <script></script>
  170.     </part>
  171.     <part>
  172.         <id>8</id>
  173.         <type>field</type>
  174.         <visible> <true /> </visible>
  175.         <dontWrap> <false /> </dontWrap>
  176.         <dontSearch> <false /> </dontSearch>
  177.         <sharedText> <false /> </sharedText>
  178.         <fixedLineHeight> <true /> </fixedLineHeight>
  179.         <autoTab> <false /> </autoTab>
  180.         <lockText> <false /> </lockText>
  181.         <rect>
  182.             <left>246</left>
  183.             <top>88</top>
  184.             <right>492</right>
  185.             <bottom>287</bottom>
  186.         </rect>
  187.         <style>scrolling</style>
  188.         <autoSelect> <false /> </autoSelect>
  189.         <showLines> <true /> </showLines>
  190.         <wideMargins> <false /> </wideMargins>
  191.         <multipleLines> <false /> </multipleLines>
  192.         <reservedFamily> 0 </reservedFamily>
  193.         <titleWidth>0</titleWidth>
  194.         <icon>0</icon>
  195.         <textAlign>left</textAlign>
  196.         <font>Monaco</font>
  197.         <textSize>9</textSize>
  198.         <textStyle>plain</textStyle>
  199.         <textHeight>12</textHeight>
  200.         <name>thedata</name>
  201.         <script></script>
  202.     </part>
  203.     <part>
  204.         <id>10</id>
  205.         <type>button</type>
  206.         <visible> <true /> </visible>
  207.         <reserved5> 0 </reserved5>
  208.         <reserved4> 0 </reserved4>
  209.         <reserved3> 0 </reserved3>
  210.         <reserved2> 0 </reserved2>
  211.         <reserved1> 0 </reserved1>
  212.         <enabled> <true /> </enabled>
  213.         <rect>
  214.             <left>381</left>
  215.             <top>297</top>
  216.             <right>489</right>
  217.             <bottom>321</bottom>
  218.         </rect>
  219.         <style>roundrect</style>
  220.         <showName> <true /> </showName>
  221.         <highlight> <false /> </highlight>
  222.         <autoHighlight> <false /> </autoHighlight>
  223.         <sharedHighlight> <true /> </sharedHighlight>
  224.         <family>0</family>
  225.         <titleWidth>0</titleWidth>
  226.         <icon>0</icon>
  227.         <textAlign>center</textAlign>
  228.         <font>Chicago</font>
  229.         <textSize>12</textSize>
  230.         <textStyle>plain</textStyle>
  231.         <name>Write the data</name>
  232.         <script>on mouseUpglobal refnumput PrefWorks(Write,refnum,card field thedata)end mouseUp</script>
  233.     </part>
  234.     <part>
  235.         <id>11</id>
  236.         <type>button</type>
  237.         <visible> <true /> </visible>
  238.         <reserved5> 0 </reserved5>
  239.         <reserved4> 0 </reserved4>
  240.         <reserved3> 0 </reserved3>
  241.         <reserved2> 0 </reserved2>
  242.         <reserved1> 0 </reserved1>
  243.         <enabled> <true /> </enabled>
  244.         <rect>
  245.             <left>254</left>
  246.             <top>297</top>
  247.             <right>362</right>
  248.             <bottom>321</bottom>
  249.         </rect>
  250.         <style>roundrect</style>
  251.         <showName> <true /> </showName>
  252.         <highlight> <false /> </highlight>
  253.         <autoHighlight> <false /> </autoHighlight>
  254.         <sharedHighlight> <true /> </sharedHighlight>
  255.         <family>0</family>
  256.         <titleWidth>0</titleWidth>
  257.         <icon>0</icon>
  258.         <textAlign>center</textAlign>
  259.         <font>Chicago</font>
  260.         <textSize>12</textSize>
  261.         <textStyle>plain</textStyle>
  262.         <name>Read the data</name>
  263.         <script>on mouseUpglobal refnumput PrefWorks(Read,refnum) into fredif first word of fred is not "ERROR:" thenput fred into cd field thedataelseput fredend ifend mouseUp</script>
  264.     </part>
  265.     <part>
  266.         <id>12</id>
  267.         <type>field</type>
  268.         <visible> <true /> </visible>
  269.         <dontWrap> <false /> </dontWrap>
  270.         <dontSearch> <false /> </dontSearch>
  271.         <sharedText> <false /> </sharedText>
  272.         <fixedLineHeight> <false /> </fixedLineHeight>
  273.         <autoTab> <false /> </autoTab>
  274.         <lockText> <false /> </lockText>
  275.         <rect>
  276.             <left>69</left>
  277.             <top>141</top>
  278.             <right>242</right>
  279.             <bottom>178</bottom>
  280.         </rect>
  281.         <style>rectangle</style>
  282.         <autoSelect> <false /> </autoSelect>
  283.         <showLines> <false /> </showLines>
  284.         <wideMargins> <false /> </wideMargins>
  285.         <multipleLines> <false /> </multipleLines>
  286.         <reservedFamily> 0 </reservedFamily>
  287.         <titleWidth>0</titleWidth>
  288.         <icon>0</icon>
  289.         <textAlign>left</textAlign>
  290.         <font>Monaco</font>
  291.         <textSize>9</textSize>
  292.         <textStyle>plain</textStyle>
  293.         <textHeight>12</textHeight>
  294.         <name>pathname</name>
  295.         <script></script>
  296.     </part>
  297.     <content>
  298.         <layer>card</layer>
  299.         <id>3</id>
  300.         <text>TEXT</text>
  301.     </content>
  302.     <content>
  303.         <layer>card</layer>
  304.         <id>4</id>
  305.         <text>R*ch</text>
  306.     </content>
  307.     <content>
  308.         <layer>card</layer>
  309.         <id>7</id>
  310.         <text>new</text>
  311.     </content>
  312.     <name>Try FileWorks..</name>
  313.     <script>on closecardglobal refnumhide message boxif refnum is not empty thenput PrefWorks(Close,refnum)put empty into refnumend ifput "new" into cd field newfileput empty into cd field thedataput empty into cd field pathnameend closecard</script>
  314. </card>
  315.  
  316.  
  317. card_5312.xml
  318. <?xml version="1.0" encoding="utf-8" ?>
  319. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  320. <card>
  321.     <id>5312</id>
  322.     <filler1>0</filler1>
  323.     <bitmap>BMAP_5433.pbm</bitmap>
  324.     <cantDelete> <true /> </cantDelete>
  325.     <showPict> <true /> </showPict>
  326.     <dontSearch> <false /> </dontSearch>
  327.     <owner>2582</owner>
  328.     <link rel="stylesheet" type="text/css" href="stylesheet_3145.css" />
  329.     <part>
  330.         <id>1</id>
  331.         <type>field</type>
  332.         <visible> <true /> </visible>
  333.         <dontWrap> <false /> </dontWrap>
  334.         <dontSearch> <false /> </dontSearch>
  335.         <sharedText> <false /> </sharedText>
  336.         <fixedLineHeight> <false /> </fixedLineHeight>
  337.         <autoTab> <false /> </autoTab>
  338.         <lockText> <true /> </lockText>
  339.         <rect>
  340.             <left>23</left>
  341.             <top>34</top>
  342.             <right>489</right>
  343.             <bottom>336</bottom>
  344.         </rect>
  345.         <style>scrolling</style>
  346.         <autoSelect> <false /> </autoSelect>
  347.         <showLines> <false /> </showLines>
  348.         <wideMargins> <false /> </wideMargins>
  349.         <multipleLines> <false /> </multipleLines>
  350.         <reservedFamily> 0 </reservedFamily>
  351.         <titleWidth>0</titleWidth>
  352.         <icon>0</icon>
  353.         <textAlign>left</textAlign>
  354.         <font>Monaco</font>
  355.         <textSize>9</textSize>
  356.         <textStyle>plain</textStyle>
  357.         <textHeight>12</textHeight>
  358.         <name>About FileWorks...</name>
  359.         <script></script>
  360.     </part>
  361.     <part>
  362.         <id>2</id>
  363.         <type>button</type>
  364.         <visible> <true /> </visible>
  365.         <reserved5> 0 </reserved5>
  366.         <reserved4> 0 </reserved4>
  367.         <reserved3> 0 </reserved3>
  368.         <reserved2> 0 </reserved2>
  369.         <reserved1> 0 </reserved1>
  370.         <enabled> <true /> </enabled>
  371.         <rect>
  372.             <left>491</left>
  373.             <top>312</top>
  374.             <right>512</right>
  375.             <bottom>342</bottom>
  376.         </rect>
  377.         <style>transparent</style>
  378.         <showName> <false /> </showName>
  379.         <highlight> <false /> </highlight>
  380.         <autoHighlight> <true /> </autoHighlight>
  381.         <sharedHighlight> <true /> </sharedHighlight>
  382.         <family>0</family>
  383.         <titleWidth>0</titleWidth>
  384.         <icon>28811</icon>
  385.         <textAlign>center</textAlign>
  386.         <font>Chicago</font>
  387.         <textSize>12</textSize>
  388.         <textStyle>plain</textStyle>
  389.         <name>right arrow</name>
  390.         <script>on mouseUpvisual effect wipe leftif the commandKey is down then go last cardelse go next cardend mouseUp</script>
  391.     </part>
  392.     <part>
  393.         <id>3</id>
  394.         <type>button</type>
  395.         <visible> <true /> </visible>
  396.         <reserved5> 0 </reserved5>
  397.         <reserved4> 0 </reserved4>
  398.         <reserved3> 0 </reserved3>
  399.         <reserved2> 0 </reserved2>
  400.         <reserved1> 0 </reserved1>
  401.         <enabled> <true /> </enabled>
  402.         <rect>
  403.             <left>0</left>
  404.             <top>312</top>
  405.             <right>20</right>
  406.             <bottom>342</bottom>
  407.         </rect>
  408.         <style>transparent</style>
  409.         <showName> <false /> </showName>
  410.         <highlight> <false /> </highlight>
  411.         <autoHighlight> <true /> </autoHighlight>
  412.         <sharedHighlight> <true /> </sharedHighlight>
  413.         <family>0</family>
  414.         <titleWidth>0</titleWidth>
  415.         <icon>28810</icon>
  416.         <textAlign>center</textAlign>
  417.         <font>Chicago</font>
  418.         <textSize>12</textSize>
  419.         <textStyle>plain</textStyle>
  420.         <name>left arrow</name>
  421.         <script>on mouseUpvisual effect wipe rightgo prev cardend mouseUp</script>
  422.     </part>
  423.     <content>
  424.         <layer>card</layer>
  425.         <id>1</id>
  426.         <text>What is it:-----------FileWorks was written to fill a need here at Curtin University for our Multimedia development in SuperCard stacks to get data to and from data files at a reasonable speed.Go to the next card of this stack to try it out....FileWorks is Copyright ¬© 1993, Ken Taylor and Curtin University of TechnologyFileWorks is distributed free, but carries no warranties of any kind.Scripting Info:---------------FileWorks takes one mandatory parameter which tells it what to do.  The choices are as follows:1) FileWorks(Open,PATHNAME[,NEW,CREATOR,TYPE])      ..where PATHNAME is the full pathname of the file           NEW is either 'new' or 'old', depending on whether you want               to create a new file or open an existing one (optional,               'old' is the default)           CREATOR is a four character OSType used when creating a new                   file (optional)           TYPE is a four character OSType used when creating a new                file (optional)            (If no type of creator is supplied, the file becomes a             TeachText‚Ñ¢ file)   ..returns two items: a file reference number which is used for any                          other commands, and                        the full pathname.2) FileWorks(Close,REFNUM)   ..where REFNUM is the file reference number returned by the Open                  clause.   ..returns either 'OK' or a string starting with 'ERROR:' (see below)3) FileWorks(Write,REFNUM,DATA)   ..where REFNUM is the file reference number returned by the Open                  clause, and           DATA is the data to be written.   ..returns either 'OK' or a string starting with 'ERROR:' (see below)4) FileWorks(Read,REFNUM)   ..where REFNUM is the file reference number returned by the Open                  clause   ..returns either the data from the file or a string starting with              'ERROR:' (see below)Errors:-------Errors are usually reasonably descriptive.  The possible error returns are:'ERROR: External FS''ERROR: File not found''ERROR: File not open''ERROR: I/O''ERROR: No such volume''ERROR: Bad file reference number''ERROR: Disk full''ERROR: File locked''ERROR: String seems to be a negative length !''ERROR: Volume locked''ERROR: Write protected''ERROR: Duplicate filename''ERROR: Too many files open''ERROR: File already open for writing''ERROR: Bad file name''ERROR: Directory is full''ERROR: End of file reached''ERROR: Too Few Parameters for this function call''ERROR: Couldn't understand directive'or in the case where something odd happens:'ERROR: Unknown error NUM'..where NUM is the Macintosh OSErr.Author Information:-------------------FileWorks was written by Ken Taylor for Curtin University in August 1993.  I can be contacted via the Internet at 'K.Taylor@info.curtin.edu.au' and would be happy to hear from you if you have any trouble with PrefWorks, any ideas for new versions (or other XFCNs or XCMDs) or even just to say hello.Ken TaylorK.Taylor@info.curtin.edu.auMacintosh Support and ProgrammingCurtin University of TechnologyKent StreetBentleyPerth, Western Australia</text>
  427.     </content>
  428.     <name>About FileWorks</name>
  429.     <script></script>
  430. </card>
  431.  
  432.  
  433. card_3035.xml
  434. <?xml version="1.0" encoding="utf-8" ?>
  435. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  436. <card>
  437.     <id>3035</id>
  438.     <filler1>0</filler1>
  439.     <bitmap>BMAP_3590.pbm</bitmap>
  440.     <cantDelete> <true /> </cantDelete>
  441.     <showPict> <true /> </showPict>
  442.     <dontSearch> <false /> </dontSearch>
  443.     <owner>2582</owner>
  444.     <link rel="stylesheet" type="text/css" href="stylesheet_3145.css" />
  445.     <part>
  446.         <id>1</id>
  447.         <type>button</type>
  448.         <visible> <true /> </visible>
  449.         <reserved5> 0 </reserved5>
  450.         <reserved4> 0 </reserved4>
  451.         <reserved3> 0 </reserved3>
  452.         <reserved2> 0 </reserved2>
  453.         <reserved1> 0 </reserved1>
  454.         <enabled> <true /> </enabled>
  455.         <rect>
  456.             <left>26</left>
  457.             <top>36</top>
  458.             <right>131</right>
  459.             <bottom>61</bottom>
  460.         </rect>
  461.         <style>roundrect</style>
  462.         <showName> <true /> </showName>
  463.         <highlight> <false /> </highlight>
  464.         <autoHighlight> <true /> </autoHighlight>
  465.         <sharedHighlight> <true /> </sharedHighlight>
  466.         <family>0</family>
  467.         <titleWidth>0</titleWidth>
  468.         <icon>0</icon>
  469.         <textAlign>center</textAlign>
  470.         <font>Chicago</font>
  471.         <textSize>12</textSize>
  472.         <textStyle>plain</textStyle>
  473.         <name>Open Pref File</name>
  474.         <script>on mouseUpglobal refnumshow message boxput PrefWorks(Open,cd field filename,char 1 to 4 of cd field type,¬¨char 1 to 4 of cd field creator) into fredif first word of fred is not "ERROR:" thenput the first item of fred into refnumput the second item of fred into cd field newfileend ifput fredend mouseUp</script>
  475.     </part>
  476.     <part>
  477.         <id>3</id>
  478.         <type>field</type>
  479.         <visible> <true /> </visible>
  480.         <dontWrap> <false /> </dontWrap>
  481.         <dontSearch> <false /> </dontSearch>
  482.         <sharedText> <false /> </sharedText>
  483.         <fixedLineHeight> <false /> </fixedLineHeight>
  484.         <autoTab> <false /> </autoTab>
  485.         <lockText> <false /> </lockText>
  486.         <rect>
  487.             <left>85</left>
  488.             <top>81</top>
  489.             <right>132</right>
  490.             <bottom>99</bottom>
  491.         </rect>
  492.         <style>rectangle</style>
  493.         <autoSelect> <false /> </autoSelect>
  494.         <showLines> <false /> </showLines>
  495.         <wideMargins> <false /> </wideMargins>
  496.         <multipleLines> <false /> </multipleLines>
  497.         <reservedFamily> 0 </reservedFamily>
  498.         <titleWidth>0</titleWidth>
  499.         <icon>0</icon>
  500.         <textAlign>left</textAlign>
  501.         <font>Geneva</font>
  502.         <textSize>12</textSize>
  503.         <textStyle>plain</textStyle>
  504.         <textHeight>16</textHeight>
  505.         <name>Type</name>
  506.         <script></script>
  507.     </part>
  508.     <part>
  509.         <id>4</id>
  510.         <type>field</type>
  511.         <visible> <true /> </visible>
  512.         <dontWrap> <false /> </dontWrap>
  513.         <dontSearch> <false /> </dontSearch>
  514.         <sharedText> <false /> </sharedText>
  515.         <fixedLineHeight> <false /> </fixedLineHeight>
  516.         <autoTab> <false /> </autoTab>
  517.         <lockText> <false /> </lockText>
  518.         <rect>
  519.             <left>85</left>
  520.             <top>111</top>
  521.             <right>133</right>
  522.             <bottom>129</bottom>
  523.         </rect>
  524.         <style>rectangle</style>
  525.         <autoSelect> <false /> </autoSelect>
  526.         <showLines> <false /> </showLines>
  527.         <wideMargins> <false /> </wideMargins>
  528.         <multipleLines> <false /> </multipleLines>
  529.         <reservedFamily> 0 </reservedFamily>
  530.         <titleWidth>0</titleWidth>
  531.         <icon>0</icon>
  532.         <textAlign>left</textAlign>
  533.         <font>Geneva</font>
  534.         <textSize>12</textSize>
  535.         <textStyle>plain</textStyle>
  536.         <textHeight>16</textHeight>
  537.         <name>Creator</name>
  538.         <script></script>
  539.     </part>
  540.     <part>
  541.         <id>5</id>
  542.         <type>button</type>
  543.         <visible> <true /> </visible>
  544.         <reserved5> 0 </reserved5>
  545.         <reserved4> 0 </reserved4>
  546.         <reserved3> 0 </reserved3>
  547.         <reserved2> 0 </reserved2>
  548.         <reserved1> 0 </reserved1>
  549.         <enabled> <true /> </enabled>
  550.         <rect>
  551.             <left>150</left>
  552.             <top>36</top>
  553.             <right>255</right>
  554.             <bottom>62</bottom>
  555.         </rect>
  556.         <style>roundrect</style>
  557.         <showName> <true /> </showName>
  558.         <highlight> <false /> </highlight>
  559.         <autoHighlight> <true /> </autoHighlight>
  560.         <sharedHighlight> <true /> </sharedHighlight>
  561.         <family>0</family>
  562.         <titleWidth>0</titleWidth>
  563.         <icon>0</icon>
  564.         <textAlign>center</textAlign>
  565.         <font>Chicago</font>
  566.         <textSize>12</textSize>
  567.         <textStyle>plain</textStyle>
  568.         <name>Close Pref File</name>
  569.         <script>on mouseUpglobal refnumput PrefWorks(Close,refnum)put empty into refnumput empty into cd field newfileend mouseUp</script>
  570.     </part>
  571.     <part>
  572.         <id>7</id>
  573.         <type>field</type>
  574.         <visible> <true /> </visible>
  575.         <dontWrap> <false /> </dontWrap>
  576.         <dontSearch> <false /> </dontSearch>
  577.         <sharedText> <false /> </sharedText>
  578.         <fixedLineHeight> <false /> </fixedLineHeight>
  579.         <autoTab> <false /> </autoTab>
  580.         <lockText> <true /> </lockText>
  581.         <rect>
  582.             <left>90</left>
  583.             <top>201</top>
  584.             <right>140</right>
  585.             <bottom>219</bottom>
  586.         </rect>
  587.         <style>rectangle</style>
  588.         <autoSelect> <false /> </autoSelect>
  589.         <showLines> <false /> </showLines>
  590.         <wideMargins> <false /> </wideMargins>
  591.         <multipleLines> <false /> </multipleLines>
  592.         <reservedFamily> 0 </reservedFamily>
  593.         <titleWidth>0</titleWidth>
  594.         <icon>0</icon>
  595.         <textAlign>left</textAlign>
  596.         <font>Geneva</font>
  597.         <textSize>12</textSize>
  598.         <textStyle>plain</textStyle>
  599.         <textHeight>16</textHeight>
  600.         <name>Newfile</name>
  601.         <script></script>
  602.     </part>
  603.     <part>
  604.         <id>8</id>
  605.         <type>field</type>
  606.         <visible> <true /> </visible>
  607.         <dontWrap> <false /> </dontWrap>
  608.         <dontSearch> <false /> </dontSearch>
  609.         <sharedText> <false /> </sharedText>
  610.         <fixedLineHeight> <true /> </fixedLineHeight>
  611.         <autoTab> <false /> </autoTab>
  612.         <lockText> <false /> </lockText>
  613.         <rect>
  614.             <left>223</left>
  615.             <top>84</top>
  616.             <right>501</right>
  617.             <bottom>282</bottom>
  618.         </rect>
  619.         <style>scrolling</style>
  620.         <autoSelect> <false /> </autoSelect>
  621.         <showLines> <true /> </showLines>
  622.         <wideMargins> <false /> </wideMargins>
  623.         <multipleLines> <false /> </multipleLines>
  624.         <reservedFamily> 0 </reservedFamily>
  625.         <titleWidth>0</titleWidth>
  626.         <icon>0</icon>
  627.         <textAlign>left</textAlign>
  628.         <font>Monaco</font>
  629.         <textSize>9</textSize>
  630.         <textStyle>plain</textStyle>
  631.         <textHeight>12</textHeight>
  632.         <name>thedata</name>
  633.         <script></script>
  634.     </part>
  635.     <part>
  636.         <id>10</id>
  637.         <type>button</type>
  638.         <visible> <true /> </visible>
  639.         <reserved5> 0 </reserved5>
  640.         <reserved4> 0 </reserved4>
  641.         <reserved3> 0 </reserved3>
  642.         <reserved2> 0 </reserved2>
  643.         <reserved1> 0 </reserved1>
  644.         <enabled> <true /> </enabled>
  645.         <rect>
  646.             <left>375</left>
  647.             <top>297</top>
  648.             <right>483</right>
  649.             <bottom>321</bottom>
  650.         </rect>
  651.         <style>roundrect</style>
  652.         <showName> <true /> </showName>
  653.         <highlight> <false /> </highlight>
  654.         <autoHighlight> <false /> </autoHighlight>
  655.         <sharedHighlight> <true /> </sharedHighlight>
  656.         <family>0</family>
  657.         <titleWidth>0</titleWidth>
  658.         <icon>0</icon>
  659.         <textAlign>center</textAlign>
  660.         <font>Chicago</font>
  661.         <textSize>12</textSize>
  662.         <textStyle>plain</textStyle>
  663.         <name>Write the data</name>
  664.         <script>on mouseUpglobal refnumput PrefWorks(Write,refnum,card field thedata)end mouseUp</script>
  665.     </part>
  666.     <part>
  667.         <id>11</id>
  668.         <type>button</type>
  669.         <visible> <true /> </visible>
  670.         <reserved5> 0 </reserved5>
  671.         <reserved4> 0 </reserved4>
  672.         <reserved3> 0 </reserved3>
  673.         <reserved2> 0 </reserved2>
  674.         <reserved1> 0 </reserved1>
  675.         <enabled> <true /> </enabled>
  676.         <rect>
  677.             <left>244</left>
  678.             <top>297</top>
  679.             <right>352</right>
  680.             <bottom>321</bottom>
  681.         </rect>
  682.         <style>roundrect</style>
  683.         <showName> <true /> </showName>
  684.         <highlight> <false /> </highlight>
  685.         <autoHighlight> <false /> </autoHighlight>
  686.         <sharedHighlight> <true /> </sharedHighlight>
  687.         <family>0</family>
  688.         <titleWidth>0</titleWidth>
  689.         <icon>0</icon>
  690.         <textAlign>center</textAlign>
  691.         <font>Chicago</font>
  692.         <textSize>12</textSize>
  693.         <textStyle>plain</textStyle>
  694.         <name>Read the data</name>
  695.         <script>on mouseUpglobal refnumput PrefWorks(Read,refnum) into fredif first word of fred is not "ERROR:" thenput fred into cd field thedataelseput fredend ifend mouseUp</script>
  696.     </part>
  697.     <part>
  698.         <id>12</id>
  699.         <type>field</type>
  700.         <visible> <true /> </visible>
  701.         <dontWrap> <false /> </dontWrap>
  702.         <dontSearch> <false /> </dontSearch>
  703.         <sharedText> <false /> </sharedText>
  704.         <fixedLineHeight> <false /> </fixedLineHeight>
  705.         <autoTab> <false /> </autoTab>
  706.         <lockText> <false /> </lockText>
  707.         <rect>
  708.             <left>85</left>
  709.             <top>139</top>
  710.             <right>210</right>
  711.             <bottom>157</bottom>
  712.         </rect>
  713.         <style>rectangle</style>
  714.         <autoSelect> <false /> </autoSelect>
  715.         <showLines> <false /> </showLines>
  716.         <wideMargins> <false /> </wideMargins>
  717.         <multipleLines> <false /> </multipleLines>
  718.         <reservedFamily> 0 </reservedFamily>
  719.         <titleWidth>0</titleWidth>
  720.         <icon>0</icon>
  721.         <textAlign>left</textAlign>
  722.         <font>Geneva</font>
  723.         <textSize>12</textSize>
  724.         <textStyle>plain</textStyle>
  725.         <textHeight>16</textHeight>
  726.         <name>filename</name>
  727.         <script></script>
  728.     </part>
  729.     <content>
  730.         <layer>card</layer>
  731.         <id>3</id>
  732.         <text>TEXT</text>
  733.     </content>
  734.     <content>
  735.         <layer>card</layer>
  736.         <id>4</id>
  737.         <text>R*ch</text>
  738.     </content>
  739.     <content>
  740.         <layer>card</layer>
  741.         <id>12</id>
  742.         <text>Test Prefs</text>
  743.     </content>
  744.     <name>Try PrefWorks..</name>
  745.     <script>on closecardglobal refnumhide message boxif refnum is not empty thenput PrefWorks(Close,refnum)put empty into refnumend ifput empty into cd field newfileput empty into cd field thedataend closecard</script>
  746. </card>
  747.  
  748.  
  749. card_4064.xml
  750. <?xml version="1.0" encoding="utf-8" ?>
  751. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  752. <card>
  753.     <id>4064</id>
  754.     <filler1>0</filler1>
  755.     <bitmap>BMAP_4977.pbm</bitmap>
  756.     <cantDelete> <true /> </cantDelete>
  757.     <showPict> <true /> </showPict>
  758.     <dontSearch> <false /> </dontSearch>
  759.     <owner>2582</owner>
  760.     <link rel="stylesheet" type="text/css" href="stylesheet_3145.css" />
  761.     <part>
  762.         <id>1</id>
  763.         <type>field</type>
  764.         <visible> <true /> </visible>
  765.         <dontWrap> <false /> </dontWrap>
  766.         <dontSearch> <false /> </dontSearch>
  767.         <sharedText> <false /> </sharedText>
  768.         <fixedLineHeight> <false /> </fixedLineHeight>
  769.         <autoTab> <false /> </autoTab>
  770.         <lockText> <true /> </lockText>
  771.         <rect>
  772.             <left>23</left>
  773.             <top>34</top>
  774.             <right>489</right>
  775.             <bottom>336</bottom>
  776.         </rect>
  777.         <style>scrolling</style>
  778.         <autoSelect> <false /> </autoSelect>
  779.         <showLines> <false /> </showLines>
  780.         <wideMargins> <false /> </wideMargins>
  781.         <multipleLines> <false /> </multipleLines>
  782.         <reservedFamily> 0 </reservedFamily>
  783.         <titleWidth>0</titleWidth>
  784.         <icon>0</icon>
  785.         <textAlign>left</textAlign>
  786.         <font>Monaco</font>
  787.         <textSize>9</textSize>
  788.         <textStyle>plain</textStyle>
  789.         <textHeight>12</textHeight>
  790.         <name>About PrefWorks...</name>
  791.         <script></script>
  792.     </part>
  793.     <content>
  794.         <layer>card</layer>
  795.         <id>1</id>
  796.         <text>What is it:-----------PrefWorks was written to fill a need here at Curtin University for our Multimedia development in SuperCard stacks to get data to and from preference files for stacks that lived on CDs.It provides an easy way of finding the correct location for a preferences file (either in the "Preferences" folder under System 7.0 or greater or in the System Folder for previous versions) and a fast way of reading and writing data to them.Go to the next card of this stack to try it out....PrefWorks is Copyright ¬© 1993, Ken Taylor and Curtin University of TechnologyPrefWorks is distributed free, but carries no warranties of any kind.Scripting Info:---------------PrefWorks takes one mandatory parameter which tells it what to do.  The choices are as follows:1) PrefWorks(Open,FILENAME[,CREATOR,TYPE])      ..where FILENAME is the name of the prefs file           CREATOR is a four character OSType used when creating a new                   file (optional)           TYPE is a four character OSType used when creating a new                file (optional)            (If no type of creator is supplied, the file becomes a             TeachText‚Ñ¢ file)   ..returns two items: a file reference number which is used for any                          other commands, and                        a boolean value representing whether a new file                          was created or not.2) PrefWorks(Close,REFNUM)   ..where REFNUM is the file reference number returned by the Open                  clause.   ..returns either 'OK' or a string starting with 'ERROR:' (see below)3) PrefWorks(Write,REFNUM,DATA)   ..where REFNUM is the file reference number returned by the Open                  clause, and           DATA is the data to be written.   ..returns either 'OK' or a string starting with 'ERROR:' (see below)4) PrefWorks(Read,REFNUM)   ..where REFNUM is the file reference number returned by the Open                  clause   ..returns either the data from the file or a string starting with              'ERROR:' (see below)Errors:-------Errors are usually reasonably descriptive.  The possible error returns are:'ERROR: External FS''ERROR: File not found''ERROR: File not open''ERROR: I/O''ERROR: No such volume''ERROR: Bad file reference number''ERROR: Disk full''ERROR: File locked''ERROR: String seems to be a negative length !''ERROR: Volume locked''ERROR: Write protected''ERROR: Duplicate filename''ERROR: Too many files open''ERROR: File already open for writing''ERROR: Bad file name''ERROR: Directory is full''ERROR: End of file reached''ERROR: Too Few Parameters for this function call''ERROR: Couldn't understand directive'or in the case where something odd happens:'ERROR: Unknown error NUM'..where NUM is the Macintosh OSErr.Author Information:-------------------PrefWorks was written by Ken Taylor for Curtin University in August 1993.  I can be contacted via the Internet at 'K.Taylor@info.curtin.edu.au' and would be happy to hear from you if you have any trouble with PrefWorks, any ideas for new versions (or other XFCNs or XCMDs) or even just to say hello.Ken TaylorK.Taylor@info.curtin.edu.auMacintosh Support and ProgrammingCurtin University of TechnologyKent StreetBentleyPerth, Western Australia</text>
  797.     </content>
  798.     <name>About PrefWorks</name>
  799.     <script></script>
  800. </card>
  801.  
  802.  
  803.